package com.hzqy.web.ac.activity;

import com.hzqy.service.activity.PersonalizedActivityServiceBean;
import com.hzqy.web.vo.activity.PersonalizedActivityVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import java.util.HashMap;
import java.util.Map;

@Controller
@RequestMapping("/personalactivity")
public class PersonalizedActivityAction {
    protected final Logger LOG = LoggerFactory.getLogger(getClass());

    @Resource
    private PersonalizedActivityServiceBean personalizedActivityServiceBean;

    @RequestMapping("/selectPersonalizedActivityVo")
    @ResponseBody
    public Object selectPersonalizedActivityVo(HttpSession session, PersonalizedActivityVo vo){
        return personalizedActivityServiceBean.selectPersonalizedActivityVo(vo);
    }

    @RequestMapping("/insertPersonalizedActivityVo")
    @ResponseBody
    public Object insertPersonalizedActivityVo(HttpSession session,PersonalizedActivityVo vo){
        Map<String,Object> resMap = new HashMap<String,Object>();
        int flag = personalizedActivityServiceBean.insertPersonalizedActivityVo(vo);
        resMap.put("flag",flag);
        return resMap;
    }

    @RequestMapping("/selectPersonalizedActivityStats")
    @ResponseBody
    public Object selectPersonalizedActivityStats(HttpSession session, PersonalizedActivityVo vo){
        return personalizedActivityServiceBean.selectPersonalizedActivityStats(vo);
    }


}
